package practice;

import java.util.concurrent.atomic.AtomicInteger;

public class ResourceFactory implements IResourceFactory {

	private AtomicInteger count = new AtomicInteger();

	@Override
	public synchronized Resource get() {
		Resource resource = new Resource(count.incrementAndGet());
		
		System.out.println("create " + resource);

		return resource;
	}
}
